﻿
using Newtonsoft.Json;

namespace SmallShop.BaseWeb
{
    public class ResultModel
    {
        [JsonProperty("code")]
        public int Code { get; set; }

        [JsonProperty("msg")]
        public string Message { get; set; }

        [JsonProperty("data")]
        public object Data { get; set; }

        public const int Ok = 0;
        
        /// <summary>
        /// 未登录
        /// </summary>
        public const int NotLogin = 1;

        /// <summary>
        /// 无效的请求数据
        /// </summary>
        public const int InValid = 2;

        /// <summary>
        /// 处理失败
        /// </summary>
        public const int Failure = 3;

        /// <summary>
        /// 错误
        /// </summary>
        public const int Error = 4;
    }
}
